import {
  onMounted as vueOnMounted,
  onUnmounted as vueOnUnmounted,
  ref,
  computed,
} from "vue";

// 从uni-app导入生命周期钩子，并重新导出
export {
  onShow,
  onLoad,
  onReady,
  onHide,
  onLaunch,
  onUnload,
} from "@dcloudio/uni-app";

// 重新导出Vue核心钩子
export { ref, computed };

// 为了确保onMounted兼容性，统一封装
export const onMounted = (callback) => {
  vueOnMounted(callback);
};

// 为了确保onUnmounted兼容性，统一封装
export const onUnmounted = (callback) => {
  vueOnUnmounted(callback);
};
